import  random
import numpy as np

demo=[]
social=[]
for i in range(50):
    demo_p=[]
    social_p=[]
    demo_t=[0,0,0,0]
    social_t=[0,0,0,0,0]
    demo_t[0] = [0] * 3 + [1] * 1
    demo_t[1] = [0] * 2 + [1] * 1
    demo_t[2] = [0] * 3 + [1] * 1
    demo_t[3] = [0] * 6 + [1] * 1
    social_t[0] = [0] * 4 + [1] * 1
    social_t[1] = [0] * 3 + [1] * 1
    social_t[2] = [0] * 2 + [1] * 1
    social_t[3] = [0] * 3 + [1] * 1
    social_t[4] = [0] * 3 + [1] * 1
    for i in range(4):
        random.shuffle(demo_t[i])
        demo_p.extend(demo_t[i])
    for i in range(5):
        random.shuffle(social_t[i])
        social_p.extend(social_t[i])
    demo.append(demo_p)
    social.append(social_p)

np.save('E:\\data_p2\\demo_p2_train_r', np.array(demo))
np.save('E:\\data_p2\\social_p2_train_r', np.array(social))
#####################################
y=[]
for i in range(50):
    temp=[0]*75+[1]*1+[2]*1+[3]*1+[4]*1+[5]*1
    random.shuffle(temp)
    y.append(temp)
np.save('E:\\data_p2\\y_p2_train_r', np.array(y))

#########################################
# y=[]
# for i in range(80):
#     temp=[1]*1+[2]*1+[3]*1+[4]*1+[5]*1
#     random.shuffle(temp)
#     y.append(temp[0])
# np.save('E:\\data_p2\\y_p2_train_r1', np.array(y))